<template>
	<view class="">
		<u-navbar :is-back="false" :border-bottom="false" is-fixed title-color="#fff" :background="{background:'#fff0'}"
			immersive>
			<view class="w20" />
			<back />
		</u-navbar>
		<view class="" style="margin-bottom: -60rpx;">
			<!-- <u-swiper :list="[banner]" class="" name="image" height="378"></u-swiper> -->
			<image :src="banner.image" @click="$advJump(banner)" class="w-max h378 db" mode=""></image>
		</view>
		<view class="p20 relative">
			<view class="w-max pt100" v-if="!list.length">
				<u-empty />
			</view>
			<view class="mb20" v-for="(item,index) in list" :key="index" @click="$goDemo(item)">
				<itemInfo :data="item" />
			</view>
			<!-- <view class="bg-fff radius20 p20 flex mb20" v-for="(item,index) in list" :key="index"
				@click="$goDemo(item)">
				<view class="w150 h150">
					<image :src="item.image" mode="aspectFill" class="w-max h-max radius10"></image>
				</view>
				<view class="flex1 pl24 ov-h">
					<view class="flex">
						<view class="fw-700 flex1 u-line-1">{{item.name}}</view>
						<view class="color-red fs30 fw-700">
							<text>{{item.suggested_price}}</text>
							<text class="fs24 fw-500">元/次</text>
						</view>
					</view>
					<view class="fs26 color-999 mt10 mb10">{{item.introduce}}</view>
					<view class="flex mt16">
						<view v-for="(item,index) in item.tags" :key="index" class="label color-fff px14 fs22 mr16">
							{{item}}
						</view>
					</view>
				</view>
			</view> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				banner: '',
				list: ''
			};
		},
		onLoad() {
			this.getList()
		},
		onReachBottom() {
			this.getList('down')
		},
		methods: {
			getList(e) {
				e == 'down' ? this.page++ : this.page = 1
				let params = {
					page: this.page,
					...this.$params,
				}
				this.$request('/member/index/serviceList', params).then(res => {
					this.banner = res.data?.sort || ''
					let list = res.data?.data?.data || ""
					e == 'down' ? this.list.push(...list) : this.list = list
				})
			},
		}
	}
</script>

<style>
</style>
